﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="orderprocess.aspx.cs" Inherits="WebSite.admin.order.orderprocess" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>阳澄湖牌 </title>
    <link href="../main.css" rel="stylesheet" type="text/css" />
    <script language="javascript">
        parent.maintitle.innerHTML = "订单处理";
        parent.contentmain.innerHTML = "<span class='title01'>所在位置：</span>订单处理"
    </script>
    <script language='javascript'>
        var path = (window.top.location).toString();
        if (path.indexOf('login.aspx') == -1) {
            if (path.indexOf('index.aspx') == -1) {
                window.top.location = 'index.aspx';
            }
        }
	</script>
	<script type="text/javascript" language="javascript">
	    function CheckSelect(del, str) {
	        var rt = true;
	        var num = 0;
	        var boxorder = 0;
	        var objCheckBox;
	        for (var i = 0; i < form1.length; i++) {
	            ///alert(form1.elements[i].type);
	            if (form1.elements[i].type == "checkbox") {
	                boxorder++;
	                objCheckBox = form1.elements[i];
	                ///alert(objCheckBox.checked);
	                if (objCheckBox.checked) {
	                    if (boxorder > 1) {
	                        //如果是第一个CheckBox，是用来全选全消的，这个不算，不用自加
	                        num++;
	                    }
	                }
	            }
	        }
	        ///alert(num);
	        if (!del) {
	            if (num > 1) {
	                alert("此操作不允许选择多个事件");
	                rt = false;
	            }
	        }
	        if (str == 'del') {
	            if (num == 0) {
	                alert("你没有选择要删除的信息");
	                rt = false
	            } else { return confirm('你确定要删除这些信息吗?'); }
	            ///alert(rt);
	        }
	        else {
	            if (str == 'update') {
	                if (num == 0) {
	                    alert("你没有选择要更新的信息");
	                    rt = false
	                } else { return confirm('你确定要更新这些信息吗?'); }
	                ///alert(rt);
	            }
	        }
	        return rt;
	    }

	    function SelectAll(sa) {
	        ///全选/全消
	        var objCheckBox;
	        for (var i = 0; i < form1.length; i++) {
	            if (form1.elements[i].type == "checkbox") {
	                objCheckBox = form1.elements[i];
	                objCheckBox.checked = sa;
	            }
	        }
	    }
</script>
    <style type="text/css">
        .style1
        {
            height: 23px;
        }
        .style2
        {
            height: 57px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <center>

  <table Width="98%" border="0" cellpadding="0" cellspacing="4" bgcolor="#FAFBFC" class="img" style="border-bottom:0;">
    <tr>
      <td width="4%"><img height="22" alt="SEARCH" src="../images/icon_search.gif" width="26" border="0" /></td>
      <td width="6%">订单号</td>
      <td width="8%"><input size="12" name="ordercode" id="ordercode" runat="server" /></td>
      <td align="left"><select name="states" id="states" runat="server">
        <option selected="selected" value="0">新订单</option>
        <option value="1">备货中</option>
        <option value="2">已发货</option>
        <option value="3">已完成</option>
      </select></td>
       <td>
            <asp:DropDownList ID="ddlProfessionAreaType" runat="server"></asp:DropDownList>
       </td>
       <td>送货日期</td>
      <td width="40%"><input name="sendDateFrom" id="sendDateFrom"  CssClass="box"  style="behavior:url('../../LWDP2.HTC'); width: 80px;" runat="server" />
      至 <input name="sendDateTo" id="sendDateTo"  CssClass="box"  style="behavior:url('../../LWDP2.HTC'); width: 80px;" runat="server" />
      </td>
      </tr></table>
      <table width="98%" border="0" cellpadding="0" cellspacing="4" bgcolor="#FAFBFC"  class="img">
    <tr>
      <td >产品名称</td>
      <td  align="left"><input size="20" name="product" id="product" runat="server" /></td> 
         <td >卡发行商</td>
      <td  align="left"> <asp:DropDownList ID="ddlCompany" runat="server"></asp:DropDownList></td> 
    <td>
    
    <asp:DropDownList ID="ddlProductType" style="display:none;" runat="server">  
    <asp:ListItem Text="所有产品类型" Value=""></asp:ListItem>
    <asp:ListItem Text="专区" Value="0" ></asp:ListItem>
    <asp:ListItem Text="礼品商城" Value="1"></asp:ListItem>
    </asp:DropDownList>
</td> 
<td style="text-align:right;">     
         卡类别</td>
         <td>        
              <asp:DropDownList ID="ddlCardType" runat="server">
              </asp:DropDownList>       
         </td> 
      <td width="25%" align="left">
       <asp:ImageButton ID="ibtnSearch" ImageUrl="../images/button04.gif" runat="server" OnClick="ibtnSearch_Click" />  
      &nbsp;
        <asp:ImageButton ID="ibtnExport" ImageUrl="../images/btnExport.gif" runat="server" OnClick="ibtnExport_Click" />  
      &nbsp;
   
        <asp:ImageButton ID="ibtnExport0" ImageUrl="../images/btnExportTemplate.gif" 
              runat="server" OnClick="ibtnExport0_Click" Visible="False" />  
   
      </td>
   
    </tr>
  </table>
  <br />
  <asp:GridView ID="GridView1" runat="server" Width="98%" CellPadding="4" ForeColor="#333333" DataKeyNames="orderid" AutoGenerateColumns="False" AllowPaging="True" pagesize="100" BorderStyle="Solid" BorderWidth="1px" OnRowDataBound="GridView1_RowDataBound"
      ShowFooter="false" EmptyDataText="没有数据记录！！" AllowSorting="True" OnSorting="GridView1_Sorting">
        <Columns>
            <asp:TemplateField ShowHeader="False" HeaderText="选择">
             <ItemStyle Width="30px" Wrap="False" />
             <HeaderTemplate>
                 <asp:CheckBox ID="CheckBox1" runat="server"></asp:CheckBox>
             </HeaderTemplate>
             <ItemTemplate>
                 <asp:CheckBox ID="CheckBox1" runat="server"></asp:CheckBox>
             </ItemTemplate>
            </asp:TemplateField>
        <asp:HyperLinkField DataNavigateUrlFields="orderid" DataNavigateUrlFormatString="orders.aspx?oid={0}" HeaderText="订单号" ItemStyle-Width="60px" DataTextField="ordercode" />
        
        <asp:BoundField HeaderText="收件人" DataField="cname1" ItemStyle-Width="60px" sortexpression="cname1" />
        <asp:TemplateField  HeaderText="联系方式">
        <ItemStyle  />
             <ItemTemplate>
             <%# Eval("tel1") + "&nbsp;&nbsp;" + Eval("phone1") %>
             </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField HeaderText="付款方式" DataField="pay" ItemStyle-Width="60px" sortexpression="pay" />
        <asp:BoundField HeaderText="总应付金额" DataField="sumprice" ItemStyle-Width="80px" sortexpression="sumprice" />
        <asp:BoundField HeaderText="下单时间" DataField="ordertime"  ItemStyle-Width="120px" sortexpression="ordertime" />
        <asp:BoundField HeaderText="送货时间" DataField="senddate"  ItemStyle-Width="120px" sortexpression="ordertime" />
        <asp:BoundField HeaderText="订单状态" DataField="states" ItemStyle-Width="60px" sortexpression="states" />
        <asp:BoundField HeaderText="" DataField="orderid" sortexpression="orderid" />
          <asp:BoundField HeaderText="物流公司" DataField="SendCompany" ItemStyle-Width="60px" sortexpression="SendCompany" />
          <asp:BoundField HeaderText="物流单号" DataField="SendCode" ItemStyle-Width="60px" sortexpression="SendCode" />
        <asp:TemplateField ShowHeader="False" HeaderText="操作">
        <ItemStyle Width="40px" />
             <ItemTemplate>
              <a title="查看" href="orders.aspx?oid=<%# Eval("orderid") %>&flag=1"><img height="16" src="../images/icon_view.gif" width="16" border="0" /></a> 
             </ItemTemplate>
        </asp:TemplateField>
        </Columns>
             <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />             
             <PagerStyle BackColor="White" ForeColor="#333333" HorizontalAlign="Center" Font-Bold="True" Font-Size=30px />
             <HeaderStyle BackColor="#E2E7EB" Font-Bold="True" ForeColor="Black" HorizontalAlign="Left" />
             <AlternatingRowStyle BackColor="White" />
             <PagerSettings Visible="False" />
    </asp:GridView>
    <table Width="98%" border="0" cellspacing="0" cellpadding="0">
       <tr>
         <td height="25" align="right" bgcolor="#E9ECEF"><asp:Label ID="LblRecordCount" runat="server"></asp:Label>
            <asp:Label ID="LblCurrentIndex" runat="server"></asp:Label>
            <asp:Label ID="LblPageCount" runat="server"></asp:Label>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <asp:LinkButton ID="btnFirst" CommandArgument="first" OnClick="PagerButtonClick" runat="server">首 页</asp:LinkButton> 
            <asp:LinkButton ID="btnPrev" CommandArgument="prev" OnClick="PagerButtonClick" runat="server">上一页</asp:LinkButton> 
            <asp:LinkButton ID="btnNext" CommandArgument="next" OnClick="PagerButtonClick" runat="server">下一页</asp:LinkButton> 
            <asp:LinkButton ID="btnLast" CommandArgument="last" OnClick="PagerButtonClick" runat="server">尾 页</asp:LinkButton> 
             跳转到第<asp:DropDownList ID="ddlCurrentPage" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"> </asp:DropDownList>页&nbsp;
         </td>
       </tr>
    </table>
  <table Width="98%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td height="40" align="left" class="style1">
      <select name="flag" id="flag" runat="server">
        <option value="0">新订单</option>
        <option value="1">备货中</option>
        <option value="2">已发货</option>
        <option value="3">已完成</option>
      </select>
 
   <asp:ImageButton ID="ibtnUpdateStates" ImageUrl="../images/btnUpdateStates.gif" OnClientClick="return CheckSelect(true,'update');" runat="server" OnClick="ibtnUpdateStates_Click" />  

        <asp:ImageButton ID="ImageButton5" ImageUrl="../images/button13.gif" Visible="false" runat="server" OnClick="ImageButton5_Click" />
        <asp:ImageButton ID="ImageButton6" ImageUrl="../images/button10.gif" Visible="false" runat="server" OnClick="ImageButton6_Click" />
       </td>
      </tr>
    <tr>
      <td height="40" align="left" class="style2">
          <asp:FileUpload ID="FileUpload1" runat="server" Width="260px" />

           <asp:ImageButton ID="ibtnInport" ImageUrl="../images/btnInport.gif" runat="server" OnClick="ibtnInport_Click" />  
       </td>
      </tr>
  </table>
  </td>
</tr>
</table>
</center>
    </div>
    </form>
</body>
</html>
